import { Col, Row, Tabs } from "antd";
import { useState, useEffect, useRef } from "react";
import AvatarCard from "./components/AvatarCard";
import Account from "./components/Account";
import Information from "./components/Information";
const userIndex = () => {
	const menuList = [
		{
			key: "1",
			label: "账户安全",
			children: (
				<>
					<Account />
				</>
			)
		},
		{
			key: "2",
			label: "基础信息",
			children: (
				<>
					<Information />
				</>
			)
		}
	];
	// 切换tabs
	const onChange = (key: string) => {
		console.log(key);
	};
	return (
		<div className="userIndex">
			<Row>
				<Col span={12}>
					<AvatarCard />
				</Col>
				<Col span={12}>
					<Tabs type="card" defaultActiveKey="1" onChange={onChange} items={menuList} />
				</Col>
			</Row>
		</div>
	);
};

export default userIndex;
